package org.nanotek.base;

import java.util.Set;

import org.codehaus.jackson.annotate.JsonIgnore;
import org.nanotek.Base;


@SuppressWarnings("serial")
public class OfficeUrl implements Base<Number> {

	private Number id; 
	private String name; 
	private String url;
	private String contactInfo; 
	private String recordType;
	
	@JsonIgnore
	private Set<OfficeDetail> officeDetails;
	
	public OfficeUrl() {
	}

	@Override
	public Number getId() {
		return id;
	}

	@Override
	public void setId(Number id) {
		this.id = id; 
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getContactInfo() {
		return contactInfo;
	}

	public void setContactInfo(String contactInfo) {
		this.contactInfo = contactInfo;
	}
	

	@Override
	public String toString() {
		return "OfficeUrl [id=" + id + ", name=" + name + ", url=" + url
				+ ", contactInfo=" + contactInfo + "]";
	}

	public Set<OfficeDetail> getOfficeDetails() {
		return officeDetails;
	}

	public void setOfficeDetails(Set<OfficeDetail> officeDetails) {
		this.officeDetails = officeDetails;
	}
	
	public String getRecordType() {
		return recordType;
	}

	public void setRecordType(String recordType) {
		this.recordType = recordType;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((contactInfo == null) ? 0 : contactInfo.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result + ((url == null) ? 0 : url.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		OfficeUrl other = (OfficeUrl) obj;
		if (contactInfo == null) {
			if (other.contactInfo != null) {
				return false;
			}
		} else if (!contactInfo.equals(other.contactInfo)) {
			return false;
		}
		if (id == null) {
			if (other.id != null) {
				return false;
			}
		} else if (!id.equals(other.id)) {
			return false;
		}
		if (name == null) {
			if (other.name != null) {
				return false;
			}
		} else if (!name.equals(other.name)) {
			return false;
		}
		if (url == null) {
			if (other.url != null) {
				return false;
			}
		} else if (!url.equals(other.url)) {
			return false;
		}
		return true;
	}

}
